﻿using System.Collections.Generic;

using ZQNB.Common.NHExtensions;

namespace ZQNB.Entity.Users
{
    public class User : NbEntity<User>
    {
        public virtual string LoginName { get; set; }
        public virtual string Name { get; set; }
        public virtual string Nick { get; set; }
    }

    public class Teacher : User
    {
        public Teacher()
        {
            TeacherSubjects = new List<TeacherSubject>();
        }

        public virtual IList<TeacherSubject> TeacherSubjects { get; set; }

        public virtual void AddTeacher(TeacherSubject teacherSubject)
        {
            TeacherSubjects.Add(teacherSubject);
            teacherSubject.Teacher = this;
        }

        ///// <summary>
        ///// 职称
        ///// </summary>
        //public virtual string Positions { get; set; }
        ///// <summary>
        ///// 任教学段
        ///// </summary>
        //public virtual string Phases { get; set; }
    }

    public class TeacherSubject : NbEntity<TeacherSubject>
    {
        public virtual Teacher Teacher { get; set; }
        public virtual string GradeCode { get; set; }
    }
}
